package com.wx.wechat.service;


import com.wx.core.exception.BusinessJsonException;
import com.wx.wechat.request.Refund;
import com.wx.wechat.request.Unifiedorder;

import java.util.Map;


/**
 * @author wx
 * @Description: 微信支付接口
 * @date 2018/10/29 002920:42
 */
public interface WeChatPayService {


    /**
     * @param unifiedorder
     * @description: 微信统一下单  场景：公共号支付、扫码支付、APP支付
     * @author: wx
     * @date: 2018/11/2 0002
     * @return: java.util.Map<java.lang.String,java.lang.String>
     */
    Map<String, String> unifiedOrder(Unifiedorder unifiedorder) throws BusinessJsonException;

    /**
     * @param productId 商品id
     * @param signType  签名类型
     * @description: 生成微信收款二维
     * @author: wx
     * @date: 2018/11/5 0005
     * @return: java.lang.String
     */
    String getWechatPayQrCode(String productId, Integer signType) throws BusinessJsonException;

    /**
     * @param notifyData 异步通知数据
     * @param signType   签名方式
     * @description: 验证异步通知签名并获取结果
     * @author: wx
     * @date: 2018/11/5 0005
     * @return: java.util.Map<java.lang.String,java.lang.String>
     */
    Map<String, String> asyncNotify(String notifyData, Integer signType) throws BusinessJsonException;
    /**
     * @description: 申请退款 刷卡支付、公共号支付、扫码支付、APP支付
     * @author: wx
     * @date: 2018/11/5 0005
     * @param refund
     * @return: java.util.Map<java.lang.String,java.lang.String>
     */
    Map<String, String> refund(Refund refund) throws BusinessJsonException;

}
